package com.niuxiaofa.newlaw.View;

import android.app.AlertDialog;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.niuxiaofa.newlaw.R;


public class AnswerTipDialog extends AlertDialog {
    private TextView tip_text,ffxd;
    boolean z;
    private ImageView ok, close;

    public AnswerTipDialog(Context context, boolean z, OnCancelListener onCancelListener) {
        this(context, R.style.AlertDialog);
        this.z = z;
    }

    public AnswerTipDialog(Context context, int i) {
        super(context, i);
    }


    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.dialog_tip);
        this.tip_text = findViewById(R.id.tip_text);
        this.ok = findViewById(R.id.ok);
        this.close = findViewById(R.id.close);
        ffxd=findViewById(R.id.ffxd);

        close.setOnClickListener(e -> {
            dismiss();
        });

        if (z){
            tip_text.setText("恭喜您签到成功\n赶紧向好友炫耀一下吧");
            ffxd.setText("分享我的成就");
            ffxd.setOnClickListener(e->{


            });
        }else {
            ok.setVisibility(View.GONE);
            tip_text.setText("你的答题机会已用完\n赶快参与获取更多机会吧");
            ffxd.setText("获取更多机会");
            ffxd.setOnClickListener(e->{


            });
        }


    }
}
